Integer

annotation class Integer(val base: TomlInteger.Base = TomlInteger.Base.Dec, val group: Int = 0)

Java field-friendly version of TomlInteger

Changes the representation of the annotated Byte, Short, Int, Long property.

class ByteCode(
@TomlInteger(
base = TomlInteger.Base.Hex,
group = 2
)
val code: Int
)
ByteCode(0xFFE490)

will produce:

code = 0xFF_E4_90

Author

fzzyhmstrs

Since

0.2.0

Properties

Link copied to clipboard
val base: TomlInteger.Base
Link copied to clipboard
val group: Int = 0

the size of a digit group separated by '_'. If set to 0, the digits will not be grouped.